import { createPinia } from 'pinia'
import { createApp } from 'vue'
import App from './App.vue'
import router from './router/index'

// 先tailwindcss
import './styles/index.scss'

// 后element-puls css, 确保按钮样式不被覆盖
import VueSynth from 'vue-synth'

import CollapseTitle from '@/components/common/CollapseTitle.vue'
import EditItem from '@/components/common/EditItem.vue'
import LucideIcon from '@/components/common/LucideIcon.vue'
import { ElMessage } from 'element-plus'

import 'virtual:svg-icons-register'

// 全局设置
window.__message = ElMessage

const app = createApp(App)

const pinia = createPinia()
app.use(router)
app.use(pinia)
app.use(VueSynth)
app.component('LucideIcon', LucideIcon)
app.component('EditItem', EditItem)
app.component('CollapseTitle', CollapseTitle)

app.mount('#app')
